{% extends "base.htm" %}
{% block main_content %}

<div class="title2">Application identifier</div> 
{% if appId %}
	The current application identifier is: <b>{{ appId }}</b>. To update it, go to <a href="/home">Home page</a>
{% else %}
	<div class="features_box">The demo of Queue service needs to know application identifier to function. Please update it at <a href="/home">Home page</a></div>
{% endif %}
	<p></p>

	<div class="title2">Submit email to background task</div>
	{% if not appId %}
		<div class="features_box">
			The Send button currently is disabled. To enable it, please provide the application identifier at <a href="/home">Home page</a>
		</div>
	{% endif %}
	Submit an email to background task and it will be sent after a couple minutes
	{% if enqueueNotification %}
		<div class="notification_box">
			The sending email task was inserted successfully to queue
		</div>
	{% endif %}
<form action="/queue" method="post">
<table class="data_table"><tr><td>Receiver emails</td><td><input type="text" class="normal_text_field" name="receivers" /> <i>Use ',' for separator </i></td></tr>
<tr><td>Subject</td><td><input type="text" class="normal_text_field" name="subject" /></td></tr>
<tr><td>Body (plain text)</td><td><textarea class="normal_textarea_field" name="message"></textarea></td></tr>
<tr><td colspan="2" align="right"><input type="submit" value="Send" {% if not appId %} disabled="disabled" {% endif %} /></td></tr>
</table>
</form>

{% endblock %}